<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
/*
	访问云平台商城
*/
defined('BY_JYA') or exit('error');
if(!$_SESSION['isfounder']){
	exi('无权操作！本功能只能超级管理员使用！','error');
}
$api_id=intval($_RQ['api_id']);
if($api_id){
	$cloud=pdo_get('core_api_shop',array('id'=>$api_id));
}else{
	$cloud=core_setting('cloud');
	if(!$cloud || !$cloud['cloudkey'] || !$cloud['secret']){
		$url='https://s.jinyunweb.com/manage/index.php';
		exi('','','',$url);
	}
}
$params=array(
	'apikey'=>$cloud['cloudkey'],
	'timestamp'=>TIMESTAMP,
);
if($_RQ['url']){
	$params['url']=$_RQ['url'];
}
$params['sign']=get_sign($params,$cloud['secret']);
if($api_id){
	$url=HTTP.$cloud['domain'].'/manage/index.php?'.http_build_query($params);
}else{
	$url=HTTP.'s.jinyunweb.com/manage/index.php?'.http_build_query($params);
}
exi('','','',$url);
